<div class="silk-cms-manage-links">
    <ul>
	<li><a href="javascript:void(0)" class="meta-add-link" i18n:translate="string:Add Attribute"></a></li>
    </ul>
</div>

<div id="silk-cms-type-meta-editor" style="display:none">

    <h5 i18n:translate="string:Attribute Editor"></h5>

    <div class="silk-cms-field">
	<label i18n:translate="string:Attribute Name"/>
	<input type="text" id="type-meta-name"/>
    </div>

    <div class="silk-cms-field">
	<label i18n:translate="string:Input Type"/>
	<select id="type-meta-input-type">
	    <option tal:repeat="input_type this/inputTypes" tal:attributes="value input_type" tal:content="input_type"/>
	</select>
    </div>


    <div class="silk-cms-field">
	<label i18n:translate="string:Default Value"/>
	<input type="text" id="type-meta-default-value"/>
    </div>


    <div class="silk-cms-field floatwrapper" id="type-meta-list-value-sources" style="display:none">

	<div>
	    <label i18n:translate="string:List Value Source"/>
	    <input type="radio" name="type-meta-list-value-source-type" id="type-meta-list-value-source-manual" value="manual"/> <label for="type-meta-list-value-source-manual" i18n:translate="string:Manual"/>
	    <input type="radio" name="type-meta-list-value-source-type" id="type-meta-list-value-source-objects" value="object"/> <label for="type-meta-list-value-source-objects" i18n:translate="string:Object Query"/>
	</div>


	<div class="list-va-block floatwrapper" id="object-list-values" style="display:none">
	    <label i18n:translate="string:Object Type"/>
	    <select id="type-meta-object-types">
		<option tal:repeat="lv_type this/types" tal:attributes="value lv_type/name" tal:content="lv_type/name"/>
	    </select>
	</div>

	<div class="list-value-block floatwrapper" id="manual-list-values" style="display:none">
	    <div class="lfloat">
		<input type="text" id="type-meta-manual-list-string"/><br/>
		<select multiple="multiple" id="type-meta-manual-list-values" rows="5">
		</select>
	    </div>
	    <div class="lfloat">
		<button id="type-meta-manual-list-add" i18n:translate="string:Add"/><br/>
		<button id="type-meta-manual-list-edit" i18n:translate="string:Update" disabled="disabled"/><br/>
		<button id="type-meta-manual-list-delete" i18n:translate="string:Remove" disabled="disabled"/><br/>
	    </div>

	</div>

    </div>

    <button id="cancel-type-meta" i18n:translate="string:Cancel"/> <button id="update-type-meta" i18n:translate="string:Save"/>
</div>

<div id="silk-cms-type-meta-list">

    <table class="silk-cms-list" id="type-meta-attributes">

	<thead>
	    <tr>
		<th i18n:translate="string:attribute name"></th>
		<th i18n:translate="string:input type"></th>
		<th i18n:translate="string:actions" class="silk-cms-row-actions"></th>
	    </tr>
	</thead>

	<tbody>

	    <tr tal:repeat="meta type/getTypeMetas" tal:attributes="class php:this.altClass('odd', 'even', repeat.meta.index)">

		<td>
		    <span tal:content="meta/name|default" class="meta_name" />
		</td>

		<td>
		    <span tal:content="meta/input_type|default" class="meta_input_type" />

		</td>

		<td class="silk-cms-row-actions">
		     <input type="hidden" name="type[meta][name][]" class="hidden_meta_name" tal:attributes="value meta/name|default"/>
		     <input type="hidden" name="type[meta][input_type][]" class="hidden_meta_input_type" tal:attributes="value meta/input_type|default"/>
		     <input type="hidden" name="type[meta][default_value][]" class="hidden_meta_default_value" tal:attributes="value meta/default_value|default"/>
		     <input type="hidden" name="type[meta][list_values][]" class="hidden_meta_list_values" tal:attributes="value meta/list_values|default"/>
		     <input type="hidden" name="type[meta][validator][]" class="hidden_meta_validator" tal:attributes="value meta/validator|default"/>
		     <input type="hidden" name="type[meta][type_id][]" class="hidden_meta_type_id" tal:attributes="value type/type_id|default"/>

		    <a href="javascript:void(0)" class="meta-edit-link" i18n:translate="string:Edit"></a> |
		    <a href="javascript:void(0)" class="meta-delete-link" i18n:translate="string:Delete"></a>
		</td>
	    </tr>

	</tbody>
    </table>
</div>

<table style="display:none">
    <tr id="default-type-meta-row">

	<td class="name_col">
	    <span class="meta_name" />
	</td>

	<td class="input_type_col">
	    <span class="meta_input_type"/>

	</td>

	<td class="silk-cms-row-actions">
		<input type="hidden" name="type[meta][name][]" class="hidden_meta_name"/>
		<input type="hidden" name="type[meta][input_type][]" class="hidden_meta_input_type"/>
		<input type="hidden" name="type[meta][default_value][]" class="hidden_meta_default_value"/>
		<input type="hidden" name="type[meta][list_values][]" class="hidden_meta_list_values"/>
		<input type="hidden" name="type[meta][validator][]" class="hidden_meta_validator"/>
		<input type="hidden" name="type[meta][type_id][]" class="hidden_meta_type_id" tal:attributes="value type/type_id"/>

	    <a href="javascript:void(0)" class="meta-edit-link" i18n:translate="string:Edit"></a> |
	    <a href="javascript:void(0)" class="meta-delete-link" i18n:translate="string:Delete"></a>
	</td>
    </tr>
</table>